package com.org.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import net.bytebuddy.asm.Advice;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * ClassName: Serve
 * Package: com.org.pojo
 * Description:
 *
 * @Author Origin
 * @Create 2024/2/6 12:35
 * @Version 1.0
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("serve")
public class Serve {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id; // 主键id
    private Integer userType; //1表示用户发起，2表示社区发起
    private String title;   //标题
    private String content; //内容
    private String img01;   //图片
    private String img02;   //图片
    private String img03;   //图片
    private String img04;   //图片

    private Integer createId;    //发起人id
    private Integer communityId;    //所属社区
    private Double duration;    //服务时长
    private String type;    
    private Integer numPeople;  //需要人数
    private Integer numJoin;    //当前参加人数

    private String timecoins;   //流过的时间币id

    private String state;   //状态：草稿|待审核|已发布|进行中|已完成


    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm", timezone = "UTC")
    private LocalDateTime startTime;    //开始时间

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm", timezone = "UTC")
    private LocalDateTime endTime; //结束时间


    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private LocalDateTime createTime;//创建时间

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private LocalDateTime updateTime;//更新时间

    private String location; //经纬度

    @TableField(value = "address")
    private String address; //真实地址

    @TableField(exist = false)
    private double distance; //距离

    @TableField(exist = false)
    private double score; //匹配的得分




}
